Add support for configurable Clear-Site-Data directive on logout#22729
Draft
jason-p-pickering wants to merge 7 commits into
Draft
Add support for configurable Clear-Site-Data directive on logout#22729jason-p-pickering wants to merge 7 commits into
jason-p-pickering wants to merge 7 commits into
Conversation
jason-p-pickering
marked this pull request as draft
January 9, 2026 07:56
Contributor
|
makes sense. We should do some analysis of logs to understand how common explicit logging out actually is. I suspect rare enough. Perhaps we can find some annoying ways to "encourage" users to log out. |
netroms
approved these changes
Jan 23, 2026
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Implemented a configurable
Clear-Site-Dataheader on logout so deployments can explicitly purge browser caches/storage (or define a custom directive) as part of the sign‑out flow.This is important for DHIS2 because it is frequently used in sensitive, shared, or resource‑constrained environments, where residual client‑side data can increase privacy risk. Ensuring a clean logout reduces the chance of data leakage between users or sessions. It should be pointed out however, that this will only work at the moment if the user explicitly logouts.
Behavior:
If
http.clear_site_datais not defined or is blank in the configuration, then noClear-Site-Dataheader will be sent on logout.If
http.clear_site_datais set to "on", then "cache", "storage" will be sent as the default.Otherwise, if
http.clear_site_datais set to anything else (a custom directive) that is what will be sent on the logout action.